
#ifndef _PS3_ERR_INJECT_H_
#define _PS3_ERR_INJECT_H_

#include <linux/workqueue.h>

#include "ps3_platform_utils.h"
#include "ps3_htp_def.h"

typedef enum {
	PS3_ERR_IJ_WATCHDOG_CONCURY = 1,      
	PS3_ERR_IJ_STOP_DUMP_CONCURY = 2,     
	PS3_ERR_IJ_SOFT_TO_HARD = 3,          
	PS3_ERR_IJ_WATCHDOG_DELAY,            
	PS3_ERR_IJ_EVENT_DELAY,               
	PS3_ERR_IJ_VD_PENDING_DELAY,          
	PS3_ERR_IJ_IOCTL_CMD_DEAD,            
	PS3_ERR_IJ_IOCTL_CMD_PENDING,         
	PS3_ERR_IJ_IOCTL_CMD_SIG_INTERRUPT,   
	PS3_ERR_IJ_IOCTL_CMD_INTERRUPT,       
	PS3_ERR_IJ_IOCTL_CMD_NO_RESP,         
	PS3_ERR_IJ_IOCTL_CMD_ABORT_FAIL,      
	PS3_ERR_IJ_IOCTL_CMD_ABORT_NO_RESP,   
	PS3_ERR_IJ_IOCTL_CMD_FORCE_DONE,      
	PS3_ERR_IJ_IOCTL_CMD_RECOVERY_CANCEL, 
	PS3_ERR_IJ_WAIT_NORMAL,               
	PS3_ERR_IJ_FIRMWARE_INIT_FAIL,        
	PS3_ERR_IJ_SCSI_SCAN_HOST_DELAY,      
	PS3_ERR_IJ_SCSI_SCAN_HOST_NOT_FINISH, 
	PS3_ERR_IJ_IGNORE_TASK_IO,            
	PS3_ERR_IJ_IGNORE_TASK_ABORT,         
	PS3_ERR_IJ_IGNORE_TASK_RESET,         
	PS3_ERR_IJ_EVENT_HANDLE,              
	PS3_ERR_IJ_DEL_SCSI_DEV1,             
	PS3_ERR_IJ_DEL_SCSI_DEV2,             
	PS3_ERR_IJ_PRIV_DATA_NULL1,           
	PS3_ERR_IJ_PRIV_DATA_NULL2,           
	PS3_ERR_IJ_PRIV_DATA_NULL3,           
	PS3_ERR_IJ_PRIV_DATA_NULL4,           
	PS3_ERR_IJ_R1X_DEL_SCSI_DEV1,         
	PS3_ERR_IJ_R1X_PRIV_DATA_NULL1,       
	PS3_ERR_IJ_HT_ABNORMAL1,              
	PS3_ERR_IJ_HT_ABNORMAL2,              
	PS3_ERR_IJ_EVENT_INT_WAIT_HARD_FLAG,            
	PS3_ERR_IJ_EVENT_INT_WAIT_HARD_SUBCRIBE,        
	PS3_ERR_IJ_EVENT_PROC_WAIT_HARD_FLAG,           
	PS3_ERR_IJ_EVENT_PROC_WAIT_HARD_SUBCRIBE,       
	PS3_ERR_IJ_EVENT_SUBC_WAIT_HARD_FLAG,           
	PS3_ERR_IJ_EVENT_SUBC_WAIT_HARD_SUBCRIBE,       
	PS3_ERR_IJ_FLAG_WAIT_EVENT_INT,                 
	PS3_ERR_IJ_FLAG_WAIT_EVENT_PROC,                
	PS3_ERR_IJ_FLAG_WAIT_EVENT_SUBCRIBE,            
	PS3_ERR_IJ_HARD_SUBC_WAIT_EVENT_INT,            
	PS3_ERR_IJ_HARD_SUBC_WAIT_EVENT_PROC,           
	PS3_ERR_IJ_HARD_SUBC_WAIT_EVENT_SUBCRIBE,       
	PS3_ERR_IJ_STORE_NO_TRIGGER_LOG,                
	PS3_ERR_IJ_DETECT_NO_TRIGGER_LOG,               
	PS3_ERR_IJ_EVENT_CMD_NULL,                      
	PS3_ERR_IJ_SUBC_EVENT_CMD_INIT,                 
	PS3_ERR_IJ_RESUBC_EVENT_CMD_INIT,               
	PS3_ERR_IJ_CANCEL_EVENT_CMD_FAIL,               
	PS3_ERR_IJ_CANCEL_VDPENDING_CMD_FAIL,           
	PS3_ERR_IJ_R1X_ABORT,                           
	PS3_ERR_IJ_TASK_RESET_DELAY,                    
	PS3_ERR_IJ_SCSI_DELIVER_DELAY,                  
	PS3_ERR_IJ_SCSI_DELIVER_DELAY_2,                
	PS3_ERR_IJ_FW_STATE_RUNNING,                    
	PS3_ERR_IJ_SET_IOC_IN_SECURITY,       
	PS3_ERR_IJ_WAIT_UNNORMAL,             
	PS3_ERR_IJ_DUMP_WAIT_RECO_VALID,      
	PS3_ERR_IJ_DUMP_WAIT_RECO_VALID_2,    
	PS3_ERR_IJ_DUMP_WAIT_NORMAL,          
	PS3_ERR_IJ_WAIT_OPT,                  
	PS3_ERR_IJ_WAIT_READY,                
	PS3_ERR_IJ_HARD_WAIT_READY_FAILED_F1,    
	PS3_ERR_IJ_HARD_WAIT_READY_FAILED_F0,    
	PS3_ERR_IJ_FWSTATE_REMOVE,            
	PS3_ERR_IJ_IOCTL_CMD_RETRY_DONE,      
	PS3_ERR_IJ_IOCTL_WAIT_UNNORMAL,       
	PS3_ERR_IJ_QOS_SET_SHARE_COUNT,       
	PS3_ERR_IJ_FORCE_EVENT_CMD_FAIL_DEAD, 
	PS3_ERR_IJ_IOCTL_WAIT_IRQ_DISABLE,    
	PS3_ERR_IJ_WAIT_IOCTL_IN_RECOVERY,    
	PS3_ERR_IJ_WAIT_IOCTL_IN_DEVICE_RESET,
	PS3_ERR_IJ_SEND_IOCTL_BLOCK_MODE_FLAG,
	PS3_ERR_IJ_FORCE_HAS_SCIS_PENDING_IO, 
	PS3_ERR_IJ_HOST_RESET_WAIT_DECIDE,          
	PS3_ERR_IJ_ABORT_PRE1_FORCE_ABORTED_CMD_DONE,			  
	PS3_ERR_IJ_ABORT_PRE2_FORCE_ABORTED_CMD_DONE,			  
	PS3_ERR_IJ_ABORT_PRE_BULID_FORCE_ABORTED_CMD_DONE,			  
	PS3_ERR_IJ_ABORT_PRE_BULID1_FORCE_ABORTED_CMD_DONE,			  
	PS3_ERR_IJ_ABORT_PRE_SEND_FORCE_ABORTED_CMD_DONE,			  
	PS3_ERR_IJ_ABORT_PRE_DEAL_FORCE_ABORTED_CMD_DONE,			  
	PS3_ERR_IJ_FORCE_STOP_ALL_CMD_DONE,			  
	PS3_ERR_IJ_PROBE_HOST_RESET,			  
	PS3_ERR_IJ_IOC_NOT_RUNNING, 		
	PS3_ERR_IJ_IOC_IS_NOT_NORMAL_IN_UNLOAD,	
	PS3_ERR_IJ_HALF_HARD_RESET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_IJ_RECOVERY_F1_B_SCAN,
	PS3_ERR_IJ_RECOVERY_F1_A_SCAN,
	PS3_ERR_IJ_RECOVERY_F1_SCAN_FINISH,
	PS3_ERR_IJ_RECOVERY_F1_EVENT,
	PS3_ERR_IJ_RECOVERY_REQ_WAIT_FUNC1_PROBE,
	PS3_ERR_IJ_RECOVERY_REQ_WAIT_FUNC1_REMOVE,
	PS3_ERR_IJ_FORCE_IOC_RUNNING_RESUME_RECOVERY,			   
	PS3_ERR_IJ_FORCE_INIT_FAIL_RESUME_RECOVERY,
	PS3_ERR_IJ_FORCE_INIT_RUNNING_FAIL_RESUME_RECOVERY,
	PS3_ERR_IJ_FORCE_INIT_RUNNING_FAIL2_RESUME_RECOVERY,
	PS3_ERR_IJ_FORCE_F1_LOAD_START_HARD_RESUME_RECOVERY,
	PS3_ERR_IJ_FORCE_F1_HOST_START_HARD_RESUME_RECOVERY,
	PS3_ERR_IJ_F1_PROBE_FORCE_IOC_FAULT_RESUME_RECOVERY,
	PS3_ERR_IJ_FORCE_F1_SCAN_START_HARD_RESUME_RECOVERY,
	PS3_ERR_IJ_FORCE_F1_A_SCAN_START_HARD_RESUME_RECOVERY,
	PS3_ERR_IJ_FORCE_F1_REMOVE_IOC_NOT_RUNNING,
	PS3_ERR_IJ_FORCE_F1_REMOVE_IOC_EVENT_FAIL,
	PS3_ERR_IJ_FORCE_F1_REMOVE_IOC_VDINFO_FAIL,
	PS3_ERR_IJ_FORCE_F1_REMOVE_IOC_WEB_FAIL,
	PS3_ERR_IJ_FORCE_F1_REMOVE_IOC_UNLOAD_FAIL,
	PS3_ERR_IJ_FORCE_F1_REMOVE_RECOVERY_REQ_IOC_CANCEL_EVENT_WORK_FAIL_RESUME,
	PS3_ERR_IJ_FORCE_F1_REMOVE_RECOVERY_REQ_IOC_EVENT_FAIL_RESUME,
	PS3_ERR_IJ_FORCE_F1_REMOVE_RECOVERY_REQ_IOC_VDINFO_FAIL_RESUME,
	PS3_ERR_IJ_FORCE_F1_RE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E_ERR_12,
	PS3_ERR_IJ_FORCE_RECOVERY_PRE_PCIE_ERR_13,
	PS3_ERR_IJ_FORCE_RECOVERY_PRE_PCIE_ERR_14,
	PS3_ERR_IJ_FORCE_RECOVERY_PRE_PCIE_ERR_15,
	PS3_ERR_IJ_FORCE_RET_FAIL7,               
	PS3_ERR_IJ_FORCE_RET_FAIL8,               
	PS3_ERR_IJ_FORCE_RECOVERY_DOORBELL_FAILED,
	PS3_ERR_IJ_FORCE_DEBUG_INIT_FAIL,         
	PS3_ERR_IJ_FORCE_TRANSPORT_INIT_FAIL,     
	PS3_ERR_IJ_FORCE_CHARDEV_INIT_FAIL,       
	PS3_ERR_IJ_FORCE_PCIDRV_INIT_FAIL,        
	PS3_ERR_IJ_FORCE_VERFILE_INIT_FAIL,       
	PS3_ERR_IJ_FORCE_VERFILE2_INIT_FAIL,      
	PS3_ERR_IJ_FORCE_RECOVERY_INIT_FAIL,      
	PS3_ERR_IJ_FORCE_RECOVERY_OPE_FAIL,       
	PS3_ERR_IJ_IO_RW_FLAG_SET_UNKOWN,         
	PS3_ERR_IJ_SOFT_ZONE_TYPE_SET_UNKOWN,     
	PS3_ERR_IJ_WATCHDOG_WAIT_RUNNING,         
	PS3_ERR_IJ_WATCHDOG_IRQ_QUEUE,            
	PS3_ERR_IJ_WATCHDOG_IRQ_QUEUE_1,          
	PS3_ERR_IJ_READ_FW_STATE_REG_FF,          
	PS3_ERR_IJ_SET_HIGH_IOPS_CHANNEL_IN_QOS,  
	PS3_ERR_IJ_FORCE_F0_WATCHDOG_START_HARD,  
	PS3_ERR_IJ_ADD_DISK_HOST_RESET,           
	PS3_ERR_IJ_PCIE_FROZEN,                   
	PS3_ERR_IJ_PEER_PCIE_FROZEN,              
	PS3_ERR_IJ_ASYNC_HARDRESET_PROBE,         
	PS3_ERR_IJ_ASYNC_HARDRESET_REMOVE,        
	PS3_ERR_IJ_WAIT_SUSPEND_WAIT_RECOVERY,    
	PS3_ERR_IJ_WAIT_SUSPEND_WAIT_RECOVERY_1,  
	PS3_ERR_IJ_MOD_SO_ADDR,                   
	PS3_ERR_IJ_SHUTDOWN_HARDRESET,            
	PS3_ERR_IJ_CANCEL_WEB_CMD_ALLOC_NULL,     
	PS3_ERR_IJ_GET_REPLYQ_COUNT_INVALID,      
	PS3_ERR_IJ_GET_MSIX_VEC_COUNT_INVALID,    
	PS3_ERR_IJ_GET_MSI_VEC_COUNT_INVALID,     
	PS3_ERR_IJ_GET_MAX_CMD_COUNT_INVALID,     
	PS3_ERR_IJ_ALLOC_LEGACY_VECTOR_FAILED,    
	PS3_ERR_IJ_CPU_MSIX_TABLE_ALLOC_FAILED,   
	PS3_ERR_IJ_REPLY_FIFO_DESC_BUF_POOL_ALLOC_FAILED,
	PS3_ERR_IJ_REPLY_FIFO_DESC_BUF_ALLOC_FAILED,
	PS3_ERR_IJ_REPLY_FIFO_POOL_ALLOC_FAILED,  
	PS3_ERR_IJ_REPLY_VIRT_BASE_ALLOC_FAILED,  
	PS3_ERR_IJ_IRQS_ALLOC_FAILED,   		  
	PS3_ERR_IJ_REPLY_REQ_IRQS_FAILED,   	  
	PS3_ERR_IJ_DUMP_REQ_IRQS_FAILED,   		  
	PS3_ERR_IJ_IRQ_VECTORS_ALLOC_FAILED,      
	PS3_ERR_IJ_SAS_PHY_GET_ERR,               
	PS3_ERR_IJ_SAS_PORT_ALLOC_NULL,           
	PS3_ERR_IJ_SAS_ALLOC_NUM_NULL,            
	PS3_ERR_IJ_SAS_PORT_ADD_FAILED,           
	PS3_ERR_IJ_SAS_ALLOC_PHY_NULL,            
	PS3_ERR_IJ_SAS_PHY_ADD_FAILED,            
	PS3_ERR_IJ_SAS_ADD_ACK_FAILED,            
	PS3_ERR_IJ_ALLOC_EXP_NODE_NULL,           
	PS3_ERR_IJ_ALLOC_EXP_PHYS_NULL,           
	PS3_ERR_IJ_SAS_PORT_ALLOC_NULL1,          
	PS3_ERR_IJ_SAS_PHY_GET_ERR1,              
	PS3_ERR_IJ_SAS_ALLOC_PHY_NULL1,           
	PS3_ERR_IJ_SAS_PHY_ADD_FAILED1,           
	PS3_ERR_IJ_READ_ATU_REG_FAILED,           
	PS3_ERR_IJ_IOC_TO_READY_FAILED,           
	PS3_ERR_IJ_BIT_POS_ERR,                   
	PS3_ERR_DUMP_ALLOC_FAILED,                
	PS3_ERR_RECOVERY_CONTEXT_ALLOC_FAILED,    
	PS3_ERR_IJ_FORCE_STREAM_DETECT_FALSE,     
	PS3_ERR_FORCE_SET_CMD_INDEX_NOT_MGR,      
	PS3_ERR_EXP_ID_ERR,                       
	PS3_ERR_HBA_PHY_COUNT_ZERO,               
	PS3_ERR_IJ_IOC_TO_READY_FAILED1,          
	PS3_ERR_IJ_REG_READ_ZERO,                 
	PS3_ERR_IJ_REG_READ_ERR,                  
	PS3_ERR_IJ_QOS_FORCE_TFIFO_ZERO_DEPTH,    
	PS3_ERR_IJ_FEATURE_REG_READ_ERR,          
	PS3_ERR_IJ_IOC_TO_CRITICAL,               
	PS3_ERR_IJ_CHANGE_FW_TO_HALT_IN_PREPARE,  
	PS3_ERR_IJ_GET_PRIV_DATA_DELAY,           
	PS3_ERR_IJ_DEL_DEV_WAIT_OS_PRIV_DATA,     
	PS3_ERR_IJ_ADD_DEV_WAIT_OS_PRIV_DATA,     
	PS3_ERR_IJ_FORCE_WAIT,                    
	PS3_ERR_IJ_SGL_ADDR_PAGE_MODE_5,		  
	PS3_ERR_IJ_SGL_ADDR_RESTORE,			  

	PS3_ERR_IJ_MAX_COUNT,
}InjectType_E;
struct ps3_rec_work_context {
	struct delayed_work _work;
	struct workqueue_struct *_queue;
	struct ps3_instance *instance;
	U32 state;
};

#ifdef PS3_SUPPORT_INJECT

#define PS3_ERR_SCENE_NUM (1000)

typedef S32 (*injectCallback)(void* userData, ...);

typedef struct Ps3Injection
{
	InjectType_E type;	
	injectCallback callback;
	Bool active;
	U16 count;
	U8 is_hit_pre:1;
	U8 is_hit_post:1;
	U8 reserved:6;
}Ps3Injection_t;

void inject_register(U16 err_type, injectCallback callback);
void inject_active_intf(U16 err_type, U16 count);
void inject_execute_callback(U16 err_type, void * data);
void inject_execute_callback_at_time(U16 err_type, void * data);
void inject_execute_callback_relevance_wait_pre(U16 err_type, U16 err_type_wait, void * data);
void inject_execute_callback_relevance_wait_post(U16 err_type, U16 err_type_wait, void * data);
void inject_execute_callback_at_time_relevance_wait_pre(U16 err_type,
	U16 err_type_wait, void * data);
void inject_execute_callback_at_time_relevance_wait_post(U16 err_type,
	U16 err_type_wait, void * data);

#define INJECT_REG(type, callback)  inject_register(type, (injectCallback)callback);
#define INJECT_ACTIVE(type, count)  inject_active_intf(type, count);
#define INJECT_START(type, data)	inject_execute_callback(type, data);
#define INJECT_AT_TIMES(type, data)	inject_execute_callback_at_time(type, data);
#define INJECT_START_WAIT_REV_PRE(type, type_wait, data) \
	inject_execute_callback_relevance_wait_pre(type, type_wait, data);
#define INJECT_START_WAIT_REV_POST(type, type_wait, data) \
	inject_execute_callback_relevance_wait_post(type, type_wait, data);
#define INJECT_START_AT_TIME_WAIT_REV_PRE(type, type_wait, data) \
	inject_execute_callback_at_time_relevance_wait_pre(type, type_wait, data);
#define INJECT_START_AT_TIME_WAIT_REV_POST(type, type_wait, data) \
	inject_execute_callback_at_time_relevance_wait_post(type, type_wait, data);



#define PS3_IJ_SLEEP(ms, err_t) do {ps3_err_inject_sleep((ms), (err_t));} while(0)
#define PS3_IJ_SLEEP_RAND(min, max, err_t) do {ps3_err_inject_sleep_rand((min), (max), (err_t));} while(0)

void ps3_err_inject_sleep(U32 ms, U16 err_type);

void ps3_err_inject_sleep_rand(U32 min, U32 max, U16 err_type);

void ps3_err_inject_err_type_valid(U16 err_type);

void ps3_err_inject_err_type_clean(U16 err_type);

Bool ps3_err_inject_err_type_get(U16 err_type);
void active_err_inject(void);
void ps3_wait_recovery_rand_finish(void);

void ps3_err_inject_wait_pre(U16 err_type_wait);
void ps3_err_inject_wait_post(U16 err_type_wait);

#define INJECT_PROBE_ACTIVE() active_err_inject();
void inject_init(void);
void inject_exit(void);

#define INJECT_INIT() inject_init();
#define INJECT_EXIT() inject_exit();

#else

#define PS3_IJ_SLEEP(ms, err_t)
#define PS3_IJ_SLEEP_RAND(min, max, err_t)
#define INJECT_REG(type, callback)
#define INJECT_ACTIVE(type, count)
#define INJECT_START(type, data)
#define INJECT_AT_TIMES(type, data)
#define INJECT_START_WAIT_REV_PRE(type, type_wait, data)
#define INJECT_START_WAIT_REV_POST(type, type_wait, data)
#define INJECT_START_AT_TIME_WAIT_REV_PRE(type, type_wait, data)
#define INJECT_START_AT_TIME_WAIT_REV_POST(type, type_wait, data)

#define INJECT_INIT()
#define INJECT_EXIT()
#define INJECT_PROBE_ACTIVE()
#endif

#endif
